'''

setStyle()
QstyleFactory()  当前平台支持的样式
QApplication.setStyle()  设置样式

'''
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
class AppWidget(QMainWindow):
    def __init__(self,parent=None):
        super(AppWidget,self).__init__(parent)
        self.setWindowFlags(Qt.FramelessWindowHint)
        self.setStyleSheet('''background-color:red''')
    def showMaximized(self):
        #得到桌面的控件
        desktop=QApplication.desktop()
        #得到桌面可显示的尺寸
        rect=desktop.availableGeometry()
        self.setGeometry(rect)
        #显示窗口
        self.show()

if __name__ == '__main__':
    app=QApplication(sys.argv)
    win=AppWidget()
    win.showMaximized()
    sys.exit(app.exec_())